DEADLOCKS
What are the necessary conditions for a deadlock to occur

Mutual exclusion: A resource is either assigned to one process  ie., a resource can be used by only one process.

Circular wait:  Circular wait is defined as situation where there exists a circular chain of processes, each waiting for a resource held by next process in the chain.

No Preemption condition: Only a process holding a resource may release it. a resource can be released only voluntarily by the process holding it, after that process has completed its task.

Hold and wait condition: Processes already holding resources may request new resources . a process holding at least one resource is waiting to acquire additional resources held by other processes.